﻿using Medianamik.Client.MVP.Model.Service;
using Medianamik.Core.Caching;
using Medianamik.Core.DAL;
using Medianamik.Core.DAL.Services;

namespace Medianamik.DummyWebSite.Container.Registries
{
    public class ServicesRegistry : StructureMap.Configuration.DSL.Registry
    {
        public ServicesRegistry()
        {
            ForRequestedType<ICurrentNodeIdRetriever>()
                 .TheDefaultIsConcreteType<CurrentNodeIdRetriever>();

            ForRequestedType(typeof(ICacheService<>))
                .TheDefaultIsConcreteType(typeof(CacheService<>));

            ForRequestedType<ICurrentNodeIdRetriever>()
                .TheDefaultIsConcreteType<CurrentNodeIdRetriever>();

            ForRequestedType<ICultureService>()
                .TheDefaultIsConcreteType<CultureService>();

            ForRequestedType<IContentStateService>()
                .TheDefaultIsConcreteType<ContentStateService>();

            ForRequestedType<INodeMapper>()
                .TheDefaultIsConcreteType<NodeMapper>();
        }
    }
}
